<?PHP

	include("../../includes/configAjax.php");
	
	$result = $users->getOnlineList($db);
	if($result){
		echo mysql_num_rows($result).";";
	} else {
		echo "error;";	
	}

	$result = $users->getRegisteredOnlineList($db);
	if($result){
		echo mysql_num_rows($result).";";
		$usersonline = "";
		while($row=mysql_fetch_object($result)){
			$currentuser = $users->getUser($db, $row->uid);
			$currentuserdata = mysql_fetch_object($currentuser);
			if($currentuserdata->rankcolour==NULL){
				$colourtouse = 	$currentuserdata->colour;
			} else {
				$colourtouse = 	$currentuserdata->rankcolour;
			}
			$usersonline .= $currentuserdata->username_clean."~".$currentuserdata->userid."~".$colourtouse."|";
		}
	} else {
		echo "error;";	
	}

	$result = $users->getGuestOnlineList($db);
	if($result){
		echo mysql_num_rows($result).";";
	} else {
		echo "error;";	
	}
	echo $usersonline;

?>